class Address < ActiveRecord::Base
  belongs_to :province
  belongs_to :city
  belongs_to :region
  has_many   :orders

  TIMING = [
    [ "中午11:00-13:00",1],
    [ "下午17:00-19:00",2],
    [ "晚上20:30-22:00",3]
  ]
  
  DAY = [
     [ "全天",1],
    [ "工作日",2],
    [ "休息日",3]
  ]

  def title
    return "<span style=''>地址:</span>" << (self.province ? self.province.name : "") <<
      (self.city ? self.city.name : "") << (self.region ? self.region.name : "") << self.street
  end
end
